<?php
include '../common/autoload.php';
if(!isset($_SESSION['memberID'])){
    echo "<script>window.location.href='/';</script>";
    exit;   
}
$orderNum = $_GET['on'];
$type = abs($_GET['t']);
if(!is_numeric($orderNum)) {
    exit('订单号必须为数字！');
}
$s = SoapInit::GetSoapInside();

$r  = $s->Order_Globle_Search("$sid","$mid","$lid","$tid","$ltitle","$ttitle",
    "$btime1","$etime1","$btime2","$etime2","$btime3","$etime3","$orderNum",
    "$orderName","$orderTel","$status","$owner");


if(is_numeric($r)){
	$res=judge($r); 
	echo "<script>alert('$res');history.go(-1);</script>";
    exit;
}
$r=simplexml_load_string($r);
if($r == '')
{
    echo '<div class="error">抱歉，没有查到订单号为“'.$orderNum.'”的任何信息。请核对您输入的订单是否正确<br/><a href="javascript:history.go(-1)">返回</a></div>';
    exit;
}
$statusList = array('未使用','已使用','已失效','已取消');
$UUlid        = $r->Rec->UUlid;
$UUtid        = $r->Rec->UUtid;
$UUmid        = (string)$r->Rec->UUmid;
$UUcertnum    = $r->Rec->UUcertnum;
$UUltitle     = $r->Rec->UUltitle;
$UUttitle     = $r->Rec->UUttitle;
$UUfromt      = $r->Rec->UUfromt;
$UUplaytime   = $r->Rec->UUbegintime;
$UUtnum       = $r->Rec->UUtnum;
$UUtprice     = $r->Rec->UUtprice;
$UUordername  = $r->Rec->UUordername;
$UUordertel   = $r->Rec->UUordertel;
$UUordertime  = $r->Rec->UUordertime;
$UUdtime      = $r->Rec->UUdtime;
$UUstatus     = (int)$r->Rec->UUstatus;
$UUpayinfo    = $r->Rec->UUpayinfo;
$UUpaystatus  = $r->Rec->UUpaystatus;
$UUtotalmoney = $r->Rec->UUtotalmoney;

 $ProdTypeHtml = "<tr><th>景点名称</th><td>{$UUltitle}</td></tr><tr><th>门票名称</th><td>{$UUttitle}</td></tr>";

?>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>验票系统--订单详情</title>
    <link rel="stylesheet" href="css/gumby.css">
    <link rel="stylesheet" href="css/public.css">
</head>
<body>
<div class="header">
    <h1 class="title">订单详情<a class="exit" href="javascript:history.go(-1)">返回</a></h1>
</div>

<body>
	<div class="container">
        <div class="row">
            <div class="twelve columns">
            	<table id="orderinfo">
            		<tbody>
                        <?=$ProdTypeHtml?>
                        <tr><th>订单号</th><td><?=$orderNum?></td></tr>
            			<tr><th>门票数</th><td><?=$UUtnum?></td></tr>
            			<tr><th>总金额</th><td><?=$UUtotalmoney/100?></td></tr>
            			<tr><th>取票人</th><td><?=$UUordername?></td></tr>
            			<tr><th>手机号</th><td><?=$UUordertel?></td></tr>
            			<tr><th>下单时间</th><td colspan="3"><?=$UUordertime;?></td></tr>
            			<tr><th>验证时间</th><td colspan="3"><?=$UUdtime?></td></tr>
            			<tr>
            				<th>订单状态</th>
            				<td><?=$statusList[$UUstatus];?></td>
            			</tr>
            		</tbody>
            	</table>
            </div>
        </div>
    </div>
    <br/>
    <br/>
    <div class="footer">
        <h1 class="title">&copy;票付通 版权所有</h1>
    </div>
</body>
</html>
